﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace Proxy.Controllers
{
    [ApiController]
    public class ProxyController : ControllerBase
    {
        [Route("Proxy")]
        [HttpGet]
        public async Task<System.Net.Http.HttpResponseMessage> Proxy(string url)
        {
            var response = await Helper.ProxyAsync(new Helper.ProxyModel { 
                Url = url
            });

            //Response.set
            //var result = new ContentResult()
            return response;
        }

        [Route("Proxy")]
        [HttpPost, HttpPut, HttpDelete]
        public string Proxy(string url, string temp)
        {
            return "11111";
        }

    }
}